<!doctype html>
<html>
<head>
	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width,maximum-scale=1.0,minimum-scale=1.0,user-scalable=no">
	<title>保养报告</title>
	<link rel="stylesheet" type="text/css" href="{:C('WEB_URL')}Public/css/base.css">
	<link rel="stylesheet" type="text/css" href="{:C('WEB_URL')}Public/mobile/css/master.css">
</head>
<body>
	<header class="tcenter fs14">
        <a href="tel:4006730088" class="tel iconfont">&#xe610;</a>
        <a href="{:C('WEB_URL')}mobile/" class="iconfont fright">&#xe60f;</a>
        <a href="javascript:window.history.go(-1)" class="iconfont fleft">&#xe612;</a>
        保养报告
    </header>

	<div class="wrap" id="orderReport">
		<h3><span>{$order['order_name']}</span>服务项目</h3>
		<div class="model">
			<div class="modelMain">
				<?php $val = $car['val']; for($i=1;$i<20;$i++){  ?>
					<?php $v=0; for($j=0;$j<count($val);$j++){ if($val[$j]['loc'] == $i){ ?>
						<i class="i<?php if($val[$j]['value'] == 1){ echo $i.' bcYellow';}elseif($val[$j]['value'] == 2){echo $i.' bcOrange';}elseif($val[$j]['value'] == 3){echo $i.' bcRed';}else{echo $i;} ?>"><?php echo $i; ?></i>
					<?php $v=1; }} ?>
					<?php if($v != 1){ ?>
					<i class="i<?php echo $i; ?>"><?php echo $i; ?></i>
					<?php } ?>
				<?php } ?>
			</div>
			<p class="legend">
				<em><i></i>油漆损伤</em>
				<em><i></i>钣金损伤</em>
				<em><i></i>钣金油漆都损伤</em>
			</p>
			<div class="picList">
				<p>
					<?php if($car['image']){ foreach($car['image'] as $list){ ?>
					<img src="<?php echo $list; ?>" data-src="<?php echo $list; ?>"/>
					<?php }}else{ echo "<em style='color:#398C27;font-size:16px;'>整车外观无损伤</em>"; } ?>
				</p>
			</div>
		</div>

		<div class="report">
			<h4>预检报告</h4>
			<ul class="clearfix">

				<?php if($orderlog){ foreach($orderlog as $list){ if($list["val_type"]!=1 && $list["type"] == "yj" &&$list['action_id']!="0.1" &&$list['action_id']!="0.2" &&$list['action_id']!="0.3"){ ?>
				<!-- <dd><?php echo $list['name']; ?><span class="<?php if($list['val_type']==2 || $list['compare']=='正常'){echo 'fcBlue';}else{echo 'fcRed';} ?>"><?php echo $list['val']; ?><?php if($list['compare']!='正常' && $list['compare']){echo '  '.$list['compare'];} ?></span></dd>  -->
				<li class="<?php if($list['val_type']==2 || $list['compare']=='正常' || $list['action_id']=='4.2.1' || $list['action_id']=='4.2.2'){echo 'orange';}else{echo 'red';} ?>">
					<a href="javascript:void(0)"><span><?php echo $list['name']; ?></span><em><?php echo $list['val']; ?></em></a>
					<i>&#xe625;</i>
				</li>
				<?php }}} ?>
			</ul>
			<notempty name="yy['image'][0]">
				<div class="audio">
					车辆状况描述：
					<audio controls="controls">
						<source src="{$yy['image'][0]}" type="audio/mpeg">
					</audio>
				</div>
			</notempty>
		</div>

		<div class="report report2">
			<a name="a" class="hidden"></a>
			<h4>施工报告</h4>
			<ul class="clearfix">
				
				<?php if($orderlog){ foreach($orderlog as $list){ if($list["val_type"]!=1 && $list["type"] == "sg"){ ?>
				<li class="<?php if($list['val_type']==2 || $list['compare']=='正常' || $list['action_id']=='5.2' || $list['action_id']=='8.2' || $list['action_id']=='9.1.3'){echo 'orange';}else{echo 'red';} ?>">
					<a href="javascript:void(0)">
						<span><?php echo $list['name']; ?></span>
						<em><?php echo $list['val']; ?></em>
						<?php if($list['compare']){ ?>
						<b><?php echo $list['biaozhun'];?></b>
						<?php }elseif(strlen($list['image'][0])>1){ ?>
						<img src="<?php echo $list['image'][0]; ?>" onclick="showBigImg(this)">
						<?php }else if($list['compare']=='正常'){ echo "<b><i>&#xe60a;</i></b>";?>
						<?php }else{ echo "<b></b>";} ?>
					</a>
					<i>&#xe625;</i>
				</li>
				<?php }}} ?>
			</ul>
		</div>

		<div class="pay">
			<a href="javascript:window.history.go(-1)" style="float:none">返回</a>
		</div>

	</div>

	<include file="Public/mobileHome" />
	<style>
		.btnReturn{display:block;height:40px;line-height:40px;text-align:center;background:#FF5A00;margin:10px;border-radius:5px;font-size:16px;color:#fff;letter-spacing:10px;}
		#bigImg{ position:fixed;width:100%;height:100%;top:0px;left:0px;display:none;}
		#bigImg .bg{background:rgba(0,0,0,0.3); position:absolute;width:100%;height:100%;}
		#bigImg img{width:100%; position:absolute;top:0;right:0;bottom:0;left:0;margin:auto;}
	</style>
	<div id="bigImg">
		<div class="bg"></div>
		<img />
	</div>
	<link rel="stylesheet" type="text/css" href="{:C('WEB_URL')}Public/mobile/css/touchImg.css">
	<script src="{:C('WEB_URL')}Public/mobile/js/touchImg.js"></script>
	<script>
		$(function(){
			$('.picList p > img').touchTouch();
			$("#bigImg").bind("touchmove",function(e){
				e.preventDefault();
			}).find(".bg").tap(function(){
				$("#bigImg").hide();
			})
		});

		function showBigImg(t){

			var url=$(t).attr("src");
			$("#bigImg").show().find("img").attr("src",url);
		}
	</script>

</body>
</html>